package ComposicaoClienteEndereco;

import org.nakedobjects.extended.Entity;
import org.nakedobjects.object.AbstractNakedObject;
import org.nakedobjects.object.Title;
import org.nakedobjects.object.collection.ExtendedInternalCollection;
import org.nakedobjects.object.value.TextString;

@Entity
public class Cliente extends AbstractNakedObject {
	
	private TextString nome = new TextString();
	private TextString cep = new TextString(); 
	
	private final ExtendedInternalCollection enderecos = new ExtendedInternalCollection(
			"Enderecos", Endereco.class, this);
	public ExtendedInternalCollection getEnderecos() {
		return enderecos;
	}
	 
	public TextString getCep() {
		return cep;
	}

	public TextString getNome() {
		return nome;
	}

	@Override
	public Title title() {
		return this.getNome().title();
	}
}